home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 1 / ETO Development Tools 1.iso / Essentials / MacApp Documentation / MacApp AppleLink Messages / MacApp.Tech$ Oct 89 / Z0190-MacApp⁄C++ Release -Oct89 < prev    next >
Encoding:
Text File  |  1989-10-26  |  2.5 KB  |  98 lines  |  [TEXT/GEOL]

  1. Item forwarded  by  BURBECK.S    to ALCABES
  2.  
  3. Item    3146942                         26-Oct-89        14:23
  4.  
  5. From:   SHEBANOW1                       Shebanow, Andrew
  6.  
  7. To:     MACAPP.TECH$                    MACAPP Tech
  8.  
  9. Sub:    MacApp/C++ Release Notes II
  10.  
  11. As most of you already know, there are some problems with the MacApp 2.0b9 C++
  12. Headers that were shipped with MPW 3.1b1 C++. This document will be sent to all
  13. MPW C++ customers, but I though you all would appreciate a look at it early.
  14.  
  15. Andy Shebanow
  16. MacDTS
  17.  
  18. ----------------------------------------------------------------------
  19. Release Notes for the MacApp 2.0b9 C++ Headers - The Sequel
  20. October 20, 1989
  21.  
  22. Due to an unfortunate oversight, there are some problems
  23. with the MacApp 2.0b9 C++ Headers - must have been the
  24. earthquake.
  25.  
  26. Types.h Problem
  27.  
  28. The MacApp 2.0b9 C++ Headers distributed with MPW C++ 3.1b1
  29. depend on the Types.h file from the as-yet-unreleased MPW
  30. 3.1. Fortunately, you can fix this by adding the following
  31. lines to the Types.h included with MPW 3.0:
  32.  
  33. enum {v,h};
  34. typedef unsigned char VHSelect;
  35.  
  36. typedef unsigned char Byte;
  37. typedef char SignedByte;
  38.  
  39. You should also replace the definition of the Length macro with:
  40.  
  41. #ifdef __cplusplus
  42. inline int Length(const StringPtr string) { return (*string); };
  43. #else
  44. #define Length(string) (*(unsigned char *)(string))
  45. #endif
  46.  
  47. Your MacApp/C++ programs will now compile much more happily.
  48.  
  49. Speedup Hints
  50.  
  51. Your MacApp/C++ compiles will be a lot faster if you use a
  52. global file to include all of your source files. About
  53. 80-90% of a typical compile is spent reading the MacApp
  54. header files, so reading them once for all source files
  55. instead of once for each source file is a big win. Your
  56. global file would look something like this:
  57.  
  58. // All.cp
  59.  
  60. #include "MMyProgram.cp"
  61. #include "UMyProgram.cp"
  62. #include "UUtilities.cp"
  63.  
  64. In your individual source files, bracket your MacApp
  65. includes so that they don't get read more than once:
  66.  
  67. // UUtilities.cp
  68.  
  69. #ifndef __UMacApp__
  70. #include <UMacApp.h>
  71. #endif __UMacApp__
  72.  
  73. #ifndef __UMacAppUtilities__
  74. #include <UMacAppUtilities.h>
  75. #endif __UMacAppUtilities__
  76.  
  77. #ifndef __UUtilities__
  78. #include "UUtilities.h"
  79. #endif __UUtilities__
  80.  
  81. // code....
  82.  
  83. Of course, you also need to put bracketing into your local
  84. include files so that things don't go haywire if you do
  85. include the same file twice:
  86.  
  87. // UUtilities.h
  88.  
  89. #ifndef __UUtilities__
  90. #define __UUtilities__ 1
  91.  
  92. // definitions
  93.  
  94. #endif __UUtilities__
  95.  
  96. ----------------------------------------------------------------------
  97.  
  98.